import Vue from 'vue'
import Router from 'vue-router'

/* Layout */
import Layout from '@/views/layout/Layout'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Index',
      redirect: { path: '/home' }
    },
    {
      path: '/home',
      component: Layout,
      children: [
        {
          path: '',
          name: 'Home',
          meta: {
            title: 'Json'
          },
          component: () => import('@/views/Home.vue')
        }
      ]
    },
    {
      path: '',
      component: Layout,
      children: [
        {
          path: '/tools/unicode',
          name: 'unicode',
          meta: {
            title: 'unicode'
          },
          component: () => import('@/views/Tools.vue')
        },
        {
          path: '/tools/utf-8',
          name: 'utf-8',
          meta: {
            title: 'utf-8'
          },
          component: () => import('@/views/Tools.vue')
        },
        {
          path: '/tools/urlencode',
          name: 'urlencode',
          meta: {
            title: 'urlencode'
          },
          component: () => import('@/views/Tools.vue')
        },
        {
          path: '/tools/unixtime',
          name: 'unixtime',
          meta: {
            title: 'unixtime'
          },
          component: () => import('@/views/Tools.vue')
        }
      ]
    }
  ]
})
